<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>间歇调用</title>
</head>
<body>
    <p id="time"></p>
    <div id="bengin" onclick='benginHandler(this)'>开始倒计时</div>
</body>
<script>
    var count = 60
    var time = document.getElementById("time");
    time.innerText = count;

    function benginHandler(val){
        count --
        time.innerText = count
        setTimeout(function(){
            benginHandler()
        },1000)
    }
    
</script>
</html>